package com.lq.memo.service;

import com.lq.email.exception.MyException;
import com.lq.memo.exception.ValidateCodeException;

import java.util.Map;

/**
 * @author LQ
 */
public interface ValidateCodeService {

    /**
     * 生成验证码并发送到邮箱
     *
     * @param key   验证码的key
     * @param email 发送的邮箱
     */
    String createValidateCode2Email(Map<String,Object> map) throws ValidateCodeException, MyException;

    /**
     * 生成验证码字符串
     * @param key 验证码key
     * @return 验证码
     */
    String createValidateCode(String key) throws ValidateCodeException;
}
